#include <stdio.h>
int missingNumber(int* nums, int numsSize) 
{   int target;
    for(int i=0;i<numsSize;i++)
    {
        int flag=0;
        for(int j=0;j<numsSize-1-i;j++)
        {  
            if(nums[j]>nums[j+1])
            { flag=1;
                int temp=nums[j];
                nums[j]=nums[j+1];
                nums[j+1]=temp;
            }
        }
        if(flag==0)
        break;
    }
    if(nums[0]!=0)
    target = 0;
    if(nums[numsSize-1]!=numsSize)
    target = numsSize;
    for(int i=0;i<numsSize-1;i++)
    {
        if(nums[i+1]!=nums[i]+1)
        target= nums[i]+1;

    }
    return target;
}